<?php

namespace DesignNew\Mediator;

require('../vendor/autoload.php');

class MedClient
{
    public function __construct()
    {
        $this->run();
    }

    public function run()
    {
        $mediator = new ChatRoom();
        $john = new User("John Doe", $mediator);
        $jane = new User("Jane Doe", $mediator);

        $john->send("Hi there!");
        $jane->send("Hey!");
    }
}

$client = new MedClient();